<?php

/**

 * Show some testimonial

 * 

 * @author Tuan

 */

$testimonials = Testimonial::getRecord(6);

?>

<div class="slider-cus">

    <ul class="sli-custommer" id="foo2" >

	<?php

	if ($testimonials > 0) {

	    foreach ($testimonials as $item) {
           $tb_id = $item->tb_id;
			//print_r($testimonials);

			if($item->tb_pic_url == ""){

			   $url_img = get_site_url().'/wp-content/themes/gorave/upload/default_pic.png';

			}

			else

			{

				 $url_img =  $item->tb_pic_url;

			}

		?>

		<li>

		    <div class="title-custom">"<?php 
			     $content_terminal =   str_replace('\\','',$item->tb_testimonial);
			     echo $content_terminal = cutString(50, $content_terminal);
			
			 ?>"<span class="mui-title mui-title-testimonial"></span></div>

		    <div class="name-custom name-in-testimonial-box">

			 <img  class="anvatar_ter" src="<?php echo  $url_img; ?>" />  

			<h4><?php echo $item->tb_name; ?></h4>

			<?php echo $item->tb_location; ?><br/>
          
               
               <div class="title">
                        <a href="<?php echo get_site_url(); ?>/detail-testimonial/?id=<?php echo $tb_id; ?>" class="button">
                         <img  style="margin-top: 7px;" src="<?php bloginfo('template_directory') ?>/images/img_27.png" />Read More</a>
                </div>

		    </div>

		</li>

		<?php

	    }

	}

	?>



    </ul>

    <a id="prev1" class="prev" href="#"></a>

    <a id="next1" class="next" href="#"></a>

</div>

<div class="title">

    <a href="<?php echo get_permalink(69); ?>" class="button"><img src="<?php bloginfo('template_directory') ?>/images/img_27.png" />READ  CUSTOMER COMMENTS</a>

</div>

